#include <string>
#include "include/mysql.h"

class MySqlApi{
public:
    MySqlApi();
    ~MySqlApi();

    bool connToDb(std::string host, std::string userName, std::string pwd, std::string dbName);

    bool createTable(std::string tbName);

    bool selectData(std::string tbName);   

    bool insertData(std::string tbName);  

    bool delData(std::string tbName);
private:
    int generate_random_int(int min, int max);

    std::string generate_random_phone();

    std::string generate_random_name();

    std::string generate_random_email();

    std::string generate_random_city();

    void my_itoa(int num, char *str);
private:
    MYSQL mysql; 
};